<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CrateShopOrderExpressTable extends Migration
{
    public function up()
    {
        //配送表(快照)
        Schema::create('shop_order_express', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('user_id')->comment('用户ID');
            $table->string('out_trade_no',23)->comment('订单号码');
            $table->string('country',50)->comment('国家');
            $table->string('country_code',6)->comment('国家区号');
            $table->string('postal_code',10)->default(0)->comment('邮编');
            $table->string('name')->comment('姓名');
            $table->string('mobile',20)->comment('电话');
            $table->string('province',50)->comment('省份');
            $table->string('city',50)->comment('城市');
            $table->string('area',50)->comment('区县');
            $table->string('detail')->comment('详细地址');

        });
    }

    public function down()
    {
        Schema::dropIfExists('shop_order_express');
    }
}
